﻿using System;

namespace Overflow
{
    class Program
    {
        static void Main(string[] args)
        {
            int x = int.MaxValue;
            int y = x + 1;

            Console.WriteLine(x + 1);
            Console.WriteLine(y);
            Console.WriteLine(y == int.MinValue);

            /*
            checked
            {
                int x = int.MaxValue;
                int y = x + 1;

                Console.WriteLine(x + 1);
                Console.WriteLine(y);
                Console.WriteLine(y == int.MinValue);
            }
            */

            Console.ReadKey();
        }
    }
}
